package com.eagle.security.controller;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eagle.security.dao.UserLogDao;
import com.eagle.security.entries.UserLog;

@RequestMapping("/home")
@Controller
public class HomeController {

    @Resource
    private UserLogDao userLogDao ;
    
    
	@RequestMapping(value = { "/index" }   )
    public String loadWidgetData( ModelMap model) {
	    try {
	        UserLog ulog = userLogDao.findUserLogById("1");
	        System.out.println( ulog.getUsername() );
	        model.put("user", "xugang");
        }
        catch (Exception e) {
            e.printStackTrace();
        }
	    
		return "z_model";
	}
	
	public static void main(String[] args) {
		if( StringUtils.isNotBlank("jljkl") ){
			System.out.println("sdfsdf");
			
		}
	}
}
